import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Flutter Demo')
        ),
        //body内容多抽离出去
        body: LayoutDemo()
      )
    );
  }
  
}

class LayoutDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListView(
      children: <Widget>[
        Card(
          margin: EdgeInsets.all(10),
          child: Column(
            children: <Widget>[
              ListTile(
                title: Text('张三', style: TextStyle(fontSize: 28),),
                subtitle: Text('高级工程师'), 
              ),
              ListTile(
                title: Text('电话：15768884587')
              ),
              ListTile(
                title: Text('地址：北京中关村')
              )
            ],  
          ), 
        ),
        Card(
          margin: EdgeInsets.all(10),
          child: Column(
            children: <Widget>[
              ListTile(
                title: Text('李四', style: TextStyle(fontSize: 28),),
                subtitle: Text('高级工程师'), 
              ),
              ListTile(
                title: Text('电话：18878377809')
              ),
              ListTile(
                title: Text('地址：北京奥运村')
              )
            ],  
          ), 
        ),
        Card(
          margin: EdgeInsets.all(10),
          child: Column(
            children: <Widget>[
              ListTile(
                title: Text('王五', style: TextStyle(fontSize: 28),),
                subtitle: Text('高级工程师'), 
              ),
              ListTile(
                title: Text('电话：18278377807')
              ),
              ListTile(
                title: Text('地址：上海宝山区')
              )
            ],  
          ), 
        )
      ], 
    );
  }
  
}